package com.gzhryc.shared_device.bxscn.code.dao.db;

import com.gzhryc.common.NumberTools;
import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.Id;
import com.gzhryc.jdbc.annotaion.Join;
import com.gzhryc.jdbc.annotaion.Table;

import java.util.Date;

/**
 * 便携式储能电池类型按日租借费用配置
 * @version 20240103
 */
@Table(name="bxscn_battery_type_day_cost")
public class BXSCNBatteryTypeDayCost {

    @Id(auto = false)
    @Column(name = "type_id", notNull = true, note = "电池类型")
    protected String typeId;
    
    @Column(name = "deposit_money", notNull = true, defVal = "100000", note = "押金，单位：分")
    protected Integer depositMoney;

    @Column(name = "day_money", notNull = true, defVal = "5000", note = "默认租金，单位：分")
    protected Integer dayMoney;

    @Column(name = "day_money_content", type = "TEXT", note = "租金按天设置")
    protected String dayMoneyContent;

    @Column(name = "update_date", autoUpdateTime = true, note = "最后修改时间")
    protected Date updateDate;

    @Column(name = "create_date", notNull = true)
    protected Date createDate;
    
    @Join(fromField="type_id")
    protected PortableEnergyBatteryType batteryType;

    public BXSCNBatteryTypeDayCost(){
        this.depositMoney = 100000;
        this.dayMoney = 5000;
    }

    public String getTypeId() {
        return typeId;
    }

    public void setTypeId(String typeId) {
        this.typeId = typeId;
    }

    public Integer getDepositMoney() {
        return depositMoney;
    }

    public void setDepositMoney(Integer depositMoney) {
        this.depositMoney = depositMoney;
    }

    public Integer getDayMoney() {
        return dayMoney;
    }

    public void setDayMoney(Integer dayMoney) {
        this.dayMoney = dayMoney;
    }

    public String getDayMoneyContent() {
        return dayMoneyContent;
    }

    public void setDayMoneyContent(String dayMoneyContent) {
        this.dayMoneyContent = dayMoneyContent;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getDepositMoneyStr(){
        return NumberTools.getMoneyStr(this.depositMoney);
    }

    public String getDayMoneyStr(){
        return NumberTools.getMoneyStr(this.dayMoney);
    }

	public PortableEnergyBatteryType getBatteryType() {
		return batteryType;
	}

	public void setBatteryType(PortableEnergyBatteryType batteryType) {
		this.batteryType = batteryType;
	}
}
